package com.akaovi.exp;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Scanner;

/**
 * @author akaovi
 * @version 1.0
 * @description
 * @date 2022/11/14 15:05
 * @since 2022/11/14 15:05
 */
public class Two {
    private static final Scanner scan = new Scanner(System.in);

    public static void main(String[] args) {
        FileOutputStream fileOutputStream = null;
        String next = scan.next();
        File file = new File("D:\\javaProject\\javaExp\\exp8\\src\\main\\resources\\two.txt");
        try {
            fileOutputStream = new FileOutputStream(file);
            fileOutputStream.write(next.getBytes());
            fileOutputStream.flush();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (fileOutputStream != null) {
                    fileOutputStream.close();
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }

}
